package rm.metrology.shared;

import java.io.Serializable;

import com.googlecode.objectify.annotation.Unindexed;

public class LogEntity implements Serializable, Comparable<LogEntity> {

	
	private static final long serialVersionUID = 1L;

	@Unindexed 
	private Long fCreatedAt = System.currentTimeMillis();
	
	@Unindexed
	private String fStaff;
	
	@Unindexed
	private String fComment;
	
	protected LogEntity() {
	}
	
	public LogEntity(String staff, String comment) {
		fStaff = staff;
		fComment = comment;
	}
	
	public final Long getCreatedTime() {
		return fCreatedAt;
	}
	
	public final String getStaff() {
		return fStaff;
	}
	
	public final String getComment() {
		return fComment;
	}

	@Override
	public int compareTo(LogEntity other) {
		return (fCreatedAt > other.getCreatedTime()) ? 1 : -1;
	}
	
}
